/**
 * Copyright (c) 2022 www.talkweb.com.cn Inc. AlL rights reserved.
 */
package com.sky.wsp.mybatis.plus.dao.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.sky.wsp.mybatis.plus.annotation.EncryptedColumn;
import com.sky.wsp.mybatis.plus.annotation.EncryptedTable;
import com.sky.wsp.mybatis.plus.annotation.TableEventListen;
import org.apache.ibatis.mapping.SqlCommandType;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户表-实体类
 *
 * @author wangshaopeng@talkweb.com.cn
 * @Date 2023-01-11
 */
@EncryptedTable
@TableEventListen({SqlCommandType.INSERT, SqlCommandType.UPDATE})
@TableName(value = "wsp_user", autoResultMap = true)
public class UserEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID，雪花算法IdType.ASSIGN_ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 租户id
     */
    private Long tenantId;
    /**
     * 部门id
     */
    private Long orgId;
    /**
     * 角色id
     */
    private Long roleId;
    /**
     * 姓名
     */
    @EncryptedColumn
    private String name;
    /**
     * 手机号
     */
    @EncryptedColumn
    private String mobile;
    /**
     * 年龄
     */
    private Integer age;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
